﻿using Basic.FormGatewaryModular.Interface;
using Basic.FormRemoteModel.PhysicalPage.Model;
using WeDonekRpc.Helper.Validate;
using WeDonekRpc.HttpApiGateway;

namespace Basic.FormGatewaryModular.Api
{
    internal class PhysicalPageApi : ApiController
    {
        private readonly IPhysicalPageService _Service;

        public PhysicalPageApi ( IPhysicalPageService service )
        {
            this._Service = service;
        }

        public PhysicalPageDto[] Gets ( [NumValidate("form.id.error", 1)] long formId )
        {
            return this._Service.Gets(formId);
        }

        public long Set ( PhysicalPageSet set )
        {
            return this._Service.Set(set);
        }
    }
}
